<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="pc/include :: header('搜索')" />
</head>
<body>
<th:block th:include="pc/include :: top" />
<div class="iw">
    <div class="crumbs">
        <p>当前位置：<a href="/">首页</a> > 搜索</p>
    </div>
    <div class="search_left">
        <div class="search_type">
            <ul>
                <li><a href="javascript:;" th:attr="goto=@{search.htm(key=${key})}" th:classappend="${exten}==''?'active'">全部</a></li>
                <li><a href="javascript:;" th:attr="goto=@{search.htm(key=${key},exten='doc')}" th:classappend="${exten}=='doc'?'active'">DOC</a></li>
                <li><a href="javascript:;" th:attr="goto=@{search.htm(key=${key},exten='ppt')}" th:classappend="${exten}=='ppt'?'active'">PPT</a></li>
                <li><a href="javascript:;" th:attr="goto=@{search.htm(key=${key},exten='xls')}" th:classappend="${exten}=='xls'?'active'">XLS</a></li>
                <li><a href="javascript:;" th:attr="goto=@{search.htm(key=${key},exten='pdf')}" th:classappend="${exten}=='pdf'?'active'">PDF</a></li>
                <li><a href="javascript:;" th:attr="goto=@{search.htm(key=${key},exten='txt')}" th:classappend="${exten}=='txt'?'active'">TXT</a></li>
            </ul>
        </div>
        <div class="search_list">
            <ul th:if="${#lists.size(docs)}>0">
                <li th:each="item,userStat :${docs}">
                    <div class="title">
                        <i th:classappend="${item.exten}"></i>
                        <h2><a th:classappend="${item.isimp}>0?'h2'" th:href="@{/detail.htm(docid=${item.docid})}" th:text="${item.title}"></a></h2>
                    </div>
                    <div class="short">
                        简介：
                        <p th:text="${item.word}"></p>
                    </div>
                    <ul class="info">
                        <li class="li1"><a th:href="@{'/user/doclist/'+${item.userid}}"> <i></i><i class="fa fa-user"></i> <span th:text="${item.nickname}" th:remove="tag"></span></a></li>
                        <li class="li2"><span th:text="${item.readcount}" th:remove="tag"></span> 次阅读</li>
                        <li class="li3"><span th:text="${item.downcount}" th:remove="tag"></span> 次下载</li>
                        <li class="li4"><i class="fa fa-clock-o"></i><span th:text="${item.insertdate}" th:remove="tag"></span></li>
                    </ul>
                </li>
            </ul>
            <ul th:if="${#lists.size(docs)} eq 0">
                <li>
                    <p>暂时没有相关文档，请换个关键字试试，如多个关键字请用空格分隔。</p>
                </li>
            </ul>
        </div>

        <div class="search_page"></div>
    </div>

</div>
<th:block th:include="pc/include :: footer" />
<script>
    $(function() {
        $(".search_page").html(CreatPage('[(${cpage})]', '[(${pagesize})]', '[(${total})]', "/search.htm?key=[(${key})]&exten=[(${exten})]&pageNum={PageCurrent}&pageSize=[(${pagesize})]"));
    });
</script>